﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Security.Cryptography;

namespace Kiaser.Core.General
{
   public class Security
    {
       public static string SHA256(string plainText)
       {
           SHA256Managed _sha256 = new SHA256Managed();
           byte[] _cipherText = _sha256.ComputeHash(Encoding.Default.GetBytes(plainText));

           return Convert.ToBase64String(_cipherText);
       }
    }
}
